home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2003 November
/
PCWK1103B.iso
/
CINEBENCH 2003
/
resource
/
modules
/
coffee
/
convenience.cof
next >
Wrap
Text File
|
2003-02-27
|
711b
|
30 lines
// This library adds some convenience functions to COFFEE
// (C) MAXON Computer GmbH 2000
GetActiveDocument()
{
var doc = GetFirstDocument(); if (!doc) return NULL;
if (doc->GetBit(BIT_ADOC)) return doc; // first element is already the active one
return doc->SearchNext(BIT_ADOC);
}
GetActiveObject(doc)
{
var op = doc->GetFirstObject(); if (!op) return NULL;
if (op->GetBit(BIT_AOBJ)) return op; // first element is already the active one
return op->SearchNext(BIT_AOBJ);
}
GetActiveTag(op)
{
var tag = op->GetFirstTag(); if (!tag) return NULL;
if (tag->GetBit(BIT_ATAG)) return tag; // first element is already the active one
return tag->SearchNext(BIT_ATAG);
}